<?php
namespace app\service;

use think\facade\Db;
use think\facade\Cache;

class ConfigService
{
    public static function getTagValue($param=null)
    {
        $cache_data=Cache::store('redis')->get('config_'.$param['tag']);
        if(empty($cache_data))
        {
            $data=Db::name('config')->where(['tag'=>$param['tag']])->value('value');
            Cache::store('redis')->set('config_'.$param['tag'],$data);
            $cache_data=$data;
        }
        return $cache_data;
    }
}